/*弹出层*/
/*
	参数解释：
	title	标题
	url		请求的url
	id		需要操作的数据id
	w		弹出层宽度（缺省调默认值）
	h		弹出层高度（缺省调默认值）
*/
function x_my_show(title,url,w,h){
	if (title == null || title == '') {
		title=false;
	};
	if (url == null || url == '') {
		url="404.html";
	};
	if (w == null || w == '') {
		w=800;
	};
	if (h == null || h == '') {
		h=($(window).height() - 50);
	};
	var index = layer.open({
		type: 2,
		fix: false, //不固定
		maxmin: true,
		title: title,
		content: url,
	});
    layer.full(index);
}
/*同意*/
function agree_shenpi(){
	layer.alert("审批同意", {icon: 6},function () {
        // 获得frame索引
        var index = parent.layer.getFrameIndex(window.name);
        //关闭当前frame
        parent.layer.close(index);
   });
    //return false;
}
/*不同意*/
function Noagree_shenpi(){
	layer.alert("审批驳回", {icon: 5},function () {
        // 获得frame索引
        var index = parent.layer.getFrameIndex(window.name);
        //关闭当前frame
        parent.layer.close(index);
   });
    //return false;
}
/*关闭弹出框口*/
function x_admin_close(){
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.close(index);
}

/*保存*/
function agree_baocun(){
	layer.alert("保存成功", {icon: 6},function () {
        // 获得frame索引
        var index = parent.layer.getFrameIndex(window.name);
        //关闭当前frame
        parent.layer.close(index);
   });
    //return false;
}

/*编辑*/
function admin_edit(title, url, id, w, h) {
    x_my_show(title, url, w, h);
}


